

/* First created by JCasGen Sat Apr 02 10:57:57 CEST 2011 */
package uima.stanford.types;

import org.apache.uima.jcas.JCas; 
import org.apache.uima.jcas.JCasRegistry;
import org.apache.uima.jcas.cas.TOP_Type;

import org.apache.uima.jcas.cas.FSArray;
import org.apache.uima.jcas.tcas.Annotation;


/** 
 * Updated by JCasGen Sat Apr 02 17:34:51 CEST 2011
 * XML source: /home/berardino/universita/IA/progetti_IA/UIMAStanfordParser/desc/TypeSystemDescriptor/StanfordTypeSystemDescriptor.xml
 * @generated */
public class UIMAConstituent extends Annotation {
  /** @generated
   * @ordered 
   */
  public final static int typeIndexID = JCasRegistry.register(UIMAConstituent.class);
  /** @generated
   * @ordered 
   */
  public final static int type = typeIndexID;
  /** @generated  */
  public              int getTypeIndexID() {return typeIndexID;}
 
  /** Never called.  Disable default constructor
   * @generated */
  protected UIMAConstituent() {}
    
  /** Internal - constructor used by generator 
   * @generated */
  public UIMAConstituent(int addr, TOP_Type type) {
    super(addr, type);
    readObject();
  }
  
  /** @generated */
  public UIMAConstituent(JCas jcas) {
    super(jcas);
    readObject();   
  } 

  /** @generated */  
  public UIMAConstituent(JCas jcas, int begin, int end) {
    super(jcas);
    setBegin(begin);
    setEnd(end);
    readObject();
  }   

  /** <!-- begin-user-doc -->
    * Write your own initialization here
    * <!-- end-user-doc -->
  @generated modifiable */
  private void readObject() {}
     
 
    
  //*--------------*
  //* Feature: tag

  /** getter for tag - gets 
   * @generated */
  public String getTag() {
    if (UIMAConstituent_Type.featOkTst && ((UIMAConstituent_Type)jcasType).casFeat_tag == null)
      jcasType.jcas.throwFeatMissing("tag", "uima.stanford.types.UIMAConstituent");
    return jcasType.ll_cas.ll_getStringValue(addr, ((UIMAConstituent_Type)jcasType).casFeatCode_tag);}
    
  /** setter for tag - sets  
   * @generated */
  public void setTag(String v) {
    if (UIMAConstituent_Type.featOkTst && ((UIMAConstituent_Type)jcasType).casFeat_tag == null)
      jcasType.jcas.throwFeatMissing("tag", "uima.stanford.types.UIMAConstituent");
    jcasType.ll_cas.ll_setStringValue(addr, ((UIMAConstituent_Type)jcasType).casFeatCode_tag, v);}    
   
    
  //*--------------*
  //* Feature: subConstituents

  /** getter for subConstituents - gets 
   * @generated */
  public FSArray getSubConstituents() {
    if (UIMAConstituent_Type.featOkTst && ((UIMAConstituent_Type)jcasType).casFeat_subConstituents == null)
      jcasType.jcas.throwFeatMissing("subConstituents", "uima.stanford.types.UIMAConstituent");
    return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((UIMAConstituent_Type)jcasType).casFeatCode_subConstituents)));}
    
  /** setter for subConstituents - sets  
   * @generated */
  public void setSubConstituents(FSArray v) {
    if (UIMAConstituent_Type.featOkTst && ((UIMAConstituent_Type)jcasType).casFeat_subConstituents == null)
      jcasType.jcas.throwFeatMissing("subConstituents", "uima.stanford.types.UIMAConstituent");
    jcasType.ll_cas.ll_setRefValue(addr, ((UIMAConstituent_Type)jcasType).casFeatCode_subConstituents, jcasType.ll_cas.ll_getFSRef(v));}    
    
  /** indexed getter for subConstituents - gets an indexed value - 
   * @generated */
  public UIMAConstituent getSubConstituents(int i) {
    if (UIMAConstituent_Type.featOkTst && ((UIMAConstituent_Type)jcasType).casFeat_subConstituents == null)
      jcasType.jcas.throwFeatMissing("subConstituents", "uima.stanford.types.UIMAConstituent");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((UIMAConstituent_Type)jcasType).casFeatCode_subConstituents), i);
    return (UIMAConstituent)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((UIMAConstituent_Type)jcasType).casFeatCode_subConstituents), i)));}

  /** indexed setter for subConstituents - sets an indexed value - 
   * @generated */
  public void setSubConstituents(int i, UIMAConstituent v) { 
    if (UIMAConstituent_Type.featOkTst && ((UIMAConstituent_Type)jcasType).casFeat_subConstituents == null)
      jcasType.jcas.throwFeatMissing("subConstituents", "uima.stanford.types.UIMAConstituent");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((UIMAConstituent_Type)jcasType).casFeatCode_subConstituents), i);
    jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((UIMAConstituent_Type)jcasType).casFeatCode_subConstituents), i, jcasType.ll_cas.ll_getFSRef(v));}
   
    
  //*--------------*
  //* Feature: token

  /** getter for token - gets 
   * @generated */
  public UIMAToken getToken() {
    if (UIMAConstituent_Type.featOkTst && ((UIMAConstituent_Type)jcasType).casFeat_token == null)
      jcasType.jcas.throwFeatMissing("token", "uima.stanford.types.UIMAConstituent");
    return (UIMAToken)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((UIMAConstituent_Type)jcasType).casFeatCode_token)));}
    
  /** setter for token - sets  
   * @generated */
  public void setToken(UIMAToken v) {
    if (UIMAConstituent_Type.featOkTst && ((UIMAConstituent_Type)jcasType).casFeat_token == null)
      jcasType.jcas.throwFeatMissing("token", "uima.stanford.types.UIMAConstituent");
    jcasType.ll_cas.ll_setRefValue(addr, ((UIMAConstituent_Type)jcasType).casFeatCode_token, jcasType.ll_cas.ll_getFSRef(v));}    
   
    
  //*--------------*
  //* Feature: isPos

  /** getter for isPos - gets 
   * @generated */
  public boolean getIsPos() {
    if (UIMAConstituent_Type.featOkTst && ((UIMAConstituent_Type)jcasType).casFeat_isPos == null)
      jcasType.jcas.throwFeatMissing("isPos", "uima.stanford.types.UIMAConstituent");
    return jcasType.ll_cas.ll_getBooleanValue(addr, ((UIMAConstituent_Type)jcasType).casFeatCode_isPos);}
    
  /** setter for isPos - sets  
   * @generated */
  public void setIsPos(boolean v) {
    if (UIMAConstituent_Type.featOkTst && ((UIMAConstituent_Type)jcasType).casFeat_isPos == null)
      jcasType.jcas.throwFeatMissing("isPos", "uima.stanford.types.UIMAConstituent");
    jcasType.ll_cas.ll_setBooleanValue(addr, ((UIMAConstituent_Type)jcasType).casFeatCode_isPos, v);}    
  }

    